Skip to content

Commit 7e94153

Browse files
committed
Remove question lockin upon moderation
1 parent 11957d9 commit 7e94153

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

kitsune/questions/jinja2/questions/question_details.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
443443
{% if product %}
444444
<span class="detail">{{ pgettext('DB: products.Product.title', product.title) }}</span>
445445
{% endif %}
446-
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
446+
{% if user and user.has_perm('questions.change_question') %}
447447
<select id="details-product" name="product">
448448
{% for p in all_products %}
449449
<option {% if product and p.id == product.id %}selected="selected"{% endif %} value="{{ p.id }}" data-url="{{ url('products.product', p.slug) }}">{{ p.title }}</option>
@@ -459,7 +459,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
459459
{% if topic %}
460460
<span class="detail">{{ pgettext('DB: products.Topic.title', topic.title) }}</span>
461461
{% endif %}
462-
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
462+
{% if user and user.has_perm('questions.change_question') %}
463463
<select id="details-topic" name="topic">
464464
{% for t in all_topics %}
465465
<option {% if topic and t.id == topic.id %}selected="selected"{% endif %} value="{{ t.id }}">{{ t.title }}</option>
@@ -469,7 +469,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
469469
</div>
470470
{% endif %}
471471

472-
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
472+
{% if user and user.has_perm('questions.change_question') %}
473473
<div class="sidebox tight condensed" id="question-locale">
474474
<span class="title">{{ _('Locale') }}:</span>
475475
<span class="detail">{{ settings.LANGUAGES_DICT[question.locale.lower()] }}</span>
@@ -528,7 +528,7 @@ <h3 class="sumo-card-heading">{{ _('Installed Plug-ins') }}</h3>
528528
</section>
529529
</div>
530530

531-
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
531+
{% if user and user.has_perm('questions.change_question') %}
532532
<div class="sidebox tight">
533533
<a href="#" id="details-edit">{{ _('Edit details') }}</a>
534534
</div>

kitsune/questions/models.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,6 @@ def is_solved(self):
400400
def is_offtopic(self):
401401
return config.OFFTOPIC_TAG_NAME in [t.name for t in self.my_tags]
402402

403-
@cached_property
404-
def is_moderated(self):
405-
return (
406-
self.flags.filter(reason=FlaggedObject.REASON_CONTENT_MODERATION)
407-
.exclude(status=FlaggedObject.FLAG_PENDING)
408-
.exists()
409-
)
410-
411403
@cached_property
412404
def created_after_failed_kb_deflection(self) -> bool:
413405
"""

0 commit comments

Comments
 (0)